<?php

class View {

    public static function cutout($name) {
        global $CAST_BUNDLE, $CAST_CONFIG;
        ob_start();
        require "{$CAST_BUNDLE['dir']}/views/cutouts/$name.{$CAST_CONFIG['viewExtension']}";
        return ob_get_flush();
    }

    public static function embedPartialView() {
        
    }

    public static function data($name){
        global $_v;
//        print_r($_v['view_vars']);
        return $_v['view_vars'][$name];
    }

    public static function content() {
        global $_v;
        return $_v['content'];
    }

    public static function root() {
        global $_v;
        if (blank($_v['root']))
            return '';
        return '/'.$_v['root'];
    }
	
	public static function title() {
		global $_v;
		return $_v['title'];
	}

}

?>
